#include "widget.h"
#include "ui_widget.h"
#include<QDebug>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    ui->spinBox->setRange(1,5);
    ui->spinBox_2->setRange(1,5);
    ui->spinBox_3->setRange(1,5);
    ui->spinBox->setValue(1);
    ui->spinBox_2->setValue(1);
    ui->spinBox_3->setValue(1);
}

Widget::~Widget()
{

    delete ui;
}


void Widget::on_pushButton_clicked()
{
    qDebug()<<"食物:"<<ui->comboBox->currentText()
           <<"数量："<<ui->spinBox->value()
          <<"食物:"<<ui->comboBox_2->currentText()
         <<"数量："<<ui->spinBox_2->value()
        <<"食物:"<<ui->comboBox_2->currentText()
       <<"数量："<<ui->spinBox_3->value();
}
